package test;

public class AboutOO {
	public static void main(String[] args)
	{
		Method m = new Method();
		m.printOS();
 	}

}

class Method{
	public void printOS() {
		String osName = System.getProperty("os.name");
		
		if(osName.equals("SunOS") || osName.equals("Linux")){
			System.out.println("This is a Unix OS");
		}
		else if(osName.equals("Windows NT") || osName.equals("Windows Vista") || osName.equals("Windows 7")){
			System.out.println("This is a Windows OS");
			//System.out.println(System.getenv());
			System.gc();
		}
		else{
			System.out.println("This is not an OS");
		}
	}
}
